<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		/*div{
			width: 100px;
			height: 100px;
			margin: 30px;
			background: red;
		}*/
		.a{
			margin: 0 auto;
			width: 100px;
			height: 100px;
			background: purple;

		}
		.b{
			margin-left: auto;
			margin-right: 200px;
			width: 300px;
			height: 100px;
			background: yellow;
			

		}
		span{
			display: block;
			margin: 100px;
		}
	</style>
</head>
<body>

<span>22222</span>

<div class='a'>11111</div>

<div class='b'></div>

</body>
</html>